MIDIReceiveNoteOn, MIDIReceiveNoteOff, MIDIReceiveController, MIDIReceivePatchChange, MIDIReceivePitchBendChange
(Event)

Purpose: Fires when a message is Received from MIDI-In.

Syntax: See Example.

Arguments:
Channel is an Integer holding the MIDI-channel.
Pitch is as Integer holding the MIDI-Pitch.
Velocity is an Integer holding the MIDI-Dynamic.
Controller is an Integer holding the MIDI-Controller Number.
Patch is an Integer holding the MIDI-Patch Number.

Example:
Private Sub Command1_Click()
____'Start reading MIDI port.
____SoundCard1.MIDIInputOpen
End Sub

Private Sub Command2_Click()
____'Stop reading MIDI port.
____SoundCard1.MIDIInputClose
End Sub

Private Sub SoundCard1_MIDIReceivePatchChange(Channel As Integer, Patch As Integer)
Debug.Print Patch
End Sub

Comments: MIDIInput must be open before receiving data. Don't send the data out again with MIDISend... as the timing is a bit behind.

See Also:

Index